package attend.dao.vacation;

import org.apache.log4j.Logger;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import attend.com.CodeMetrix;

import util.DBConnection;

import exception.BaseException;

/**
 * 휴가관리 DAO
 * @author Yang Chang Hwan D
 * @since 2009/01/21
 */
public class VacationDao extends DBConnection {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger.getLogger(VacationDao.class);
	
	private List<HashMap<String, String>>	list	=	null;
	
	private Connection 			con 	= 	null;
	private PreparedStatement 	pstmt 	= 	null;
	private ResultSet 			rs 		= 	null;
	private ResultSet 			rs2 	= 	null;
	
	private StringBuffer 		sql 	= 	new StringBuffer(); //sql statement
	private StringBuffer 		sql2 	= 	new StringBuffer(); //sql statement
	
	private String				rtn_msg;
	
	private int					rowCount;	//total row count
	private float					tot_alloc;	//휴가 배정 합계
	private float					tot_use;    //휴가 사용 합계

	private ArrayList<HashMap<String, String>> vacalist;	//휴가조회
	private List<List<HashMap<String, String>>> listVacation;//휴가 전체조회 
	private HashMap<String, String> 			vaca_info;   //휴가 시작 ~ 종료일(배정 팝업)

	private ArrayList<HashMap<String,String>> listVacaAssgin;	//휴가배정 전체조회
	private int totalVacaAssgin;	//휴가배정 합계조회
	private ArrayList<HashMap<String,String>> listVacaUse;		//휴가사용 조회
	
	private ArrayList<HashMap<String,String>> listVacaAssginM;	//휴가배정 전체조회 삭제기능 포함

	private String group_no;

	private String emp_no;

	private String emp_nm;

	private String team_no;
	
	/**
	 * <pre>
	 * Default Constructor
	 * </pre>
	 * @throws BaseException
	 * @throws SQLException
	 */
	public VacationDao() {	}
	
	/**
	 * <pre>조회된  건수를   리 턴한다.</pre>
	 * @param r_start
	 * @param r_end
	 * @throws BaseException
	 */
	public void countRowAjaxList( List<String> listCondition ) throws BaseException {
		
		try {
			con = super.getDataSource().getConnection();
			
			sql.setLength(0);
			
			sql.append("\n").append(" SELECT COUNT(*) AS CNT ");
			sql.append("\n").append(" FROM ( ");
			sql.append("\n").append(" 	SELECT ROW_NUMBER() OVER(ORDER BY A.EMP_NO) AS ROWNUM, ");
			sql.append("\n").append(" 	(SELECT DEPT_NM FROM TB_DEPT WHERE DEPT_NO=B.UPPER_DEPT_NO) AS GROUP_NM, ");
			sql.append("\n").append(" 	B.DEPT_NM AS TEAM_NM, A.EMP_NM, A.APPLY_DT, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"','VACA_S_DATE') AS VACA_S_DATE, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"','VACA_E_DATE') AS VACA_E_DATE, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"',A.EMP_NO,'2001') AS AN_SUM_TOTAL, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"',A.EMP_NO,'2002') AS SP_SUM_TOTAL, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"',A.EMP_NO,'9999') AS AN_SP_SUM_TOTAL, ");
			sql.append("\n").append(" 	A.EMP_NO, B.UPPER_DEPT_NO, B.DEPT_NO ");
			sql.append("\n").append(" 	FROM TB_EMP A ");
			sql.append("\n").append(" 	INNER JOIN TB_DEPT B ON A.FK_DEPT_NO = B.DEPT_NO ");
			sql.append("\n").append(" 	WHERE A.WORK_YN='Y' AND A.EMP_NO <> '1' ");
			sql.append("\n").append(" 	AND B.UPPER_DEPT_NO   LIKE REPLACE('"+listCondition.get(1)+"' , 'ALL' , '%') ");
			sql.append("\n").append(" 	AND B.DEPT_NO         LIKE REPLACE('"+listCondition.get(2)+"' , 'ALL' , '%') ");
			sql.append("\n").append(" 	AND A.EMP_NO         LIKE REPLACE('"+listCondition.get(3)+"' , 'ALL' , '%') ");
			sql.append("\n").append(" 	AND A.EMP_NM         LIKE '%'+REPLACE('"+listCondition.get(4)+"' , 'ALL' , '')+'%' ");
			sql.append("\n").append(" ) AA ");
			sql.append("\n").append(" WHERE 0=0 ");
			
//			System.out.println("======================================\r\n");
//			System.out.println("쿼리실행 내용\r\n" + sql.toString());
//			System.out.println("======================================\r\n");

			pstmt 	= 	con.prepareStatement(sql.toString());

//			for (String string : listCondition) {
//				System.out.println(string + "			<<<<<---retrieveAjaxList---<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
//			}
			
			rs 		= 	pstmt.executeQuery();
			
			
			if (rs.next()) {
				
				rowCount	=	rs.getInt("CNT");

			}
    	
		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) pstmt.close();
				if (rs != null) rs.close();
				if(con != null) con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}          
		}
	}

	/**
	 * 휴가배정 조회 결과를 ajax로 조회.
	 * @since	2009/01/22
	 * @param listCondition
	 * @param r_start		- 시작줄
	 * @param r_end			- 마지막줄
	 * @throws BaseException
	 * @throws SQLException
	 */
	public void retrieveAjaxList(List<String> listCondition , int r_start , int r_end) throws BaseException , SQLException {
		
		con = super.getDataSource().getConnection();
		
		try {
			
			sql.setLength(0);
			
			sql.append("\n").append(" SELECT AA.ROWNUM, AA.EMP_NO, AA.GROUP_NM, AA.TEAM_NM, AA.EMP_NM, AA.APPLY_DT, ");
			sql.append("\n").append(" AA.VACA_S_DATE, AA.VACA_E_DATE, AA.AN_SUM_TOTAL, AA.SP_SUM_TOTAL, AA.AN_SP_SUM_TOTAL, ");
			sql.append("\n").append(" AA.UPPER_DEPT_NO, AA.DEPT_NO ");
			sql.append("\n").append(" FROM ( ");
			sql.append("\n").append(" 	SELECT ROW_NUMBER() OVER(ORDER BY A.EMP_NO) AS ROWNUM, ");
			sql.append("\n").append(" 	(SELECT DEPT_NM FROM TB_DEPT WHERE DEPT_NO=B.UPPER_DEPT_NO) AS GROUP_NM, ");
			sql.append("\n").append(" 	B.DEPT_NM AS TEAM_NM, A.EMP_NM, A.APPLY_DT, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"','VACA_S_DATE') AS VACA_S_DATE, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"','VACA_E_DATE') AS VACA_E_DATE, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"',A.EMP_NO,'2001') AS AN_SUM_TOTAL, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"',A.EMP_NO,'2002') AS SP_SUM_TOTAL, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"',A.EMP_NO,'9999') AS AN_SP_SUM_TOTAL, ");
			sql.append("\n").append(" 	A.EMP_NO, B.UPPER_DEPT_NO, B.DEPT_NO ");
			sql.append("\n").append(" 	FROM TB_EMP A ");
			sql.append("\n").append(" 	INNER JOIN TB_DEPT B ON A.FK_DEPT_NO = B.DEPT_NO ");
			sql.append("\n").append(" 	WHERE A.WORK_YN='Y' AND A.EMP_NO <> '1' ");
			sql.append("\n").append(" 	AND B.UPPER_DEPT_NO   LIKE REPLACE('"+listCondition.get(1)+"' , 'ALL' , '%') ");
			sql.append("\n").append(" 	AND B.DEPT_NO         LIKE REPLACE('"+listCondition.get(2)+"' , 'ALL' , '%') ");
			sql.append("\n").append(" 	AND A.EMP_NO         LIKE REPLACE('"+listCondition.get(3)+"' , 'ALL' , '%') ");
			sql.append("\n").append(" 	AND A.EMP_NM         LIKE '%'+REPLACE('"+listCondition.get(4)+"' , 'ALL' , '')+'%' ");
			sql.append("\n").append(" ) AA ");
			sql.append("\n").append(" WHERE AA.ROWNUM BETWEEN "+r_start+" AND "+r_end+" ");

			
//			System.out.println("======================================\r\n");
//			System.out.println("쿼리실행 내용\r\n" + sql.toString());
//			System.out.println("======================================\r\n");

			pstmt 	= 	con.prepareStatement(sql.toString());

//			for (String string : listCondition) {
//				System.out.println(string + "			<<<<<---retrieveAjaxList---<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
//			}
			
			rs 		= 	pstmt.executeQuery();
			
			System.out.println("****************");
			System.out.println(sql.toString());
			System.out.println("****************");
			
			list 	= 	new ArrayList<HashMap<String,String>>();
			
			while (rs.next()) {
				
//				각 행의 각각컬럼의 데이터를 담는다.
				HashMap<String , String>  hash_map = new HashMap<String, String>();
				
				//hash_map.put("대소문자로 구분하여 사용할 것." , "디비에서는 상관없음.");
				//jsp에서 <s:property value='upper_dept_no'/> 와 같아야 함.
				hash_map.put("emp_no"			, rs.getString("EMP_NO") );
				hash_map.put("group_nm"			, rs.getString("GROUP_NM") );
				hash_map.put("team_nm"			, rs.getString("TEAM_NM") );
				hash_map.put("emp_nm"			, rs.getString("EMP_NM") );
				hash_map.put("apply_dt"			, rs.getString("APPLY_DT") );
				hash_map.put("vaca_s_date" 		, rs.getString("VACA_S_DATE") );
				hash_map.put("vaca_e_date"		, rs.getString("VACA_E_DATE") );
				hash_map.put("an_sum_total"		, rs.getString("AN_SUM_TOTAL") );
				hash_map.put("sp_sum_total"		, rs.getString("SP_SUM_TOTAL") );
				hash_map.put("an_sp_sum_total"	, rs.getString("AN_SP_SUM_TOTAL") );
				
				list.add(hash_map);	// 한행의 데이터인 맵객체를 담는다.
			}
    	
		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) pstmt.close();
				if (rs != null) rs.close();
				if(con != null) con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}          
		}
	}
	
	/**
	 * 휴가배정 팝업창 조회.
	 * @since	2009/12/31
	 * @param listCondition
	 * @param r_start		- 시작줄
	 * @param r_end			- 마지막줄
	 * @throws BaseException
	 * @throws SQLException
	 */
	public void vacaInform(List<String> listCondition , int r_start , int r_end) throws BaseException , SQLException {
		
		con = super.getDataSource().getConnection();
		
		try {
			
			sql.setLength(0);
			
			sql.append("\n").append(" SELECT AA.ROWNUM, AA.EMP_NO, AA.GROUP_NM, AA.TEAM_NM, AA.EMP_NM, AA.APPLY_DT, ");
			sql.append("\n").append(" AA.VACA_S_DATE, AA.VACA_E_DATE, AA.AN_SUM_TOTAL, AA.SP_SUM_TOTAL, AA.AN_SP_SUM_TOTAL, ");
			sql.append("\n").append(" AA.UPPER_DEPT_NO, AA.DEPT_NO ");
			sql.append("\n").append(" FROM ( ");
			sql.append("\n").append(" 	SELECT ROW_NUMBER() OVER(ORDER BY A.EMP_NO) AS ROWNUM, ");
			sql.append("\n").append(" 	(SELECT DEPT_NM FROM TB_DEPT WHERE DEPT_NO=B.UPPER_DEPT_NO) AS GROUP_NM, ");
			sql.append("\n").append(" 	B.DEPT_NM AS TEAM_NM, A.EMP_NM, A.APPLY_DT, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"','VACA_S_DATE') AS VACA_S_DATE, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"','VACA_E_DATE') AS VACA_E_DATE, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"',A.EMP_NO,'2001') AS AN_SUM_TOTAL, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"',A.EMP_NO,'2002') AS SP_SUM_TOTAL, ");
			sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"',A.EMP_NO,'9999') AS AN_SP_SUM_TOTAL, ");
			sql.append("\n").append(" 	A.EMP_NO, B.UPPER_DEPT_NO, B.DEPT_NO ");
			sql.append("\n").append(" 	FROM TB_EMP A ");
			sql.append("\n").append(" 	INNER JOIN TB_DEPT B ON A.FK_DEPT_NO = B.DEPT_NO ");
			sql.append("\n").append(" 	WHERE A.WORK_YN='Y' AND A.EMP_NO <> '1' ");
			sql.append("\n").append(" 	AND B.UPPER_DEPT_NO   LIKE REPLACE('"+listCondition.get(1)+"' , 'ALL' , '%') ");
			sql.append("\n").append(" 	AND B.DEPT_NO         LIKE REPLACE('"+listCondition.get(2)+"' , 'ALL' , '%') ");
			sql.append("\n").append(" 	AND A.EMP_NO         LIKE REPLACE('"+listCondition.get(3)+"' , 'ALL' , '%') ");
			sql.append("\n").append(" 	AND A.EMP_NM         LIKE '%'+REPLACE('"+listCondition.get(4)+"' , 'ALL' , '')+'%' ");
			sql.append("\n").append(" ) AA ");
			sql.append("\n").append(" WHERE AA.ROWNUM BETWEEN "+r_start+" AND "+r_end+" ");

			
//			System.out.println("======================================\r\n");
//			System.out.println("쿼리실행 내용\r\n" + sql.toString());
//			System.out.println("======================================\r\n");

			pstmt 	= 	con.prepareStatement(sql.toString());

//			for (String string : listCondition) {
//				System.out.println(string + "			<<<<<---retrieveAjaxList---<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
//			}
			
			rs 		= 	pstmt.executeQuery();
			
			System.out.println("#############");
			System.out.println(sql.toString());
			System.out.println("#############");
			
			list 	= 	new ArrayList<HashMap<String,String>>();
			
			while (rs.next()) {
				
//				각 행의 각각컬럼의 데이터를 담는다.
				HashMap<String , String>  hash_map = new HashMap<String, String>();
				
				//hash_map.put("대소문자로 구분하여 사용할 것." , "디비에서는 상관없음.");
				//jsp에서 <s:property value='upper_dept_no'/> 와 같아야 함.
				hash_map.put("emp_no"			, rs.getString("EMP_NO") );
				hash_map.put("group_nm"			, rs.getString("GROUP_NM") );
				hash_map.put("team_nm"			, rs.getString("TEAM_NM") );
				hash_map.put("emp_nm"			, rs.getString("EMP_NM") );
				hash_map.put("apply_dt"			, rs.getString("APPLY_DT") );
				hash_map.put("vaca_s_date" 		, rs.getString("VACA_S_DATE") );
				hash_map.put("vaca_e_date"		, rs.getString("VACA_E_DATE") );
				hash_map.put("an_sum_total"		, rs.getString("AN_SUM_TOTAL") );
				hash_map.put("sp_sum_total"		, rs.getString("SP_SUM_TOTAL") );
				hash_map.put("an_sp_sum_total"	, rs.getString("AN_SP_SUM_TOTAL") );
				
				list.add(hash_map);	// 한행의 데이터인 맵객체를 담는다.
			}
    	
		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) pstmt.close();
				if (rs != null) rs.close();
				if(con != null) con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}          
		}
	}
	
	/**
	 * 휴가배정 INSERT
	 * @since 2009/01/22
	 * 
	 * @throws BaseException
	 * @throws SQLException
	 */
	public void insertAllocVacation(List<String> listCondition, int alloc_id) throws BaseException , SQLException {
		
		System.out.println("!!!!!!!!!!!!!!!!");
		
		//System.out.println("----------------------------------------------------------");
		//System.out.println("파라미터 정보:");
		
		//for (int i = 0; i < listCondition.size(); i++) {
		//	System.out.println(listCondition.get(i));
		//}
		
		//System.out.println("alloc_id : "+alloc_id);
		//System.out.println("----------------------------------------------------------");
		
		con = super.getDataSource().getConnection();
		
		try {
			/**************************************************************************/
			//T	R	A	N	S	A	C	T	I	O	N				S T A R T
			/**************************************************************************/
			con.setAutoCommit(false);				//default value ture
			
			sql.setLength(0);	//sql초기화
			
			sql.append("\n").append(" INSERT INTO TB_VACATION(WORK_YEAR, EMP_NO, VACATION_TP, ALLOC_NUM, ALLOC_DT, REMARK, REG_DATE, ALLOC_ID, JOB_TYPE) ");
			sql.append("\n").append(" SELECT DBO.FNC_GET_VACATION_WORK(APPLY_DT,?,'WORK_YEAR'), ");
			sql.append("\n").append(" EMP_NO, ? AS VACATION_TP, ? AS ALLOC_NUM, ? AS ALLOC_DT, ? AS REMARK, ");
			sql.append("\n").append(" GETDATE() AS REG_DATE, ? AS ALLOC_ID, 'ADMIN' AS JOB_TYPE ");
			sql.append("\n").append(" FROM TB_EMP ");
			sql.append("\n").append(" WHERE EMP_NO = ? ");
			
            pstmt = con.prepareStatement(sql.toString());
			
            /**************************************************************************/
			//D Y N A M I C	 P A R A M E T E R	 A D D M E N T		S T A R T
			/**************************************************************************/
    		
            /**************************************************************************/
            //D Y N A M I C	 P A R A M E T E R	 A D D M E N T		E   N   D
            /**************************************************************************/
			
			/**************************************************************************/
			//P A R A M E T E R		V A L U E S		S T A R T
			/**************************************************************************/

			String[] arrStr = listCondition.get(0).split(",");	//사번을 배열로 넣음.
			
			
			for (int i = 0; i < arrStr.length; i++) {
				
				//listCondition.add(idx++ , ch_emp_no );		//체크된 값-사번--1,2,3,4
				//listCondition.add(idx++ , alloc_date);		//배정기준일자
				//listCondition.add(idx++ , svaca);			//휴가유형
				//listCondition.add(idx++ , add_alloc_num);	//배당일수
				//listCondition.add(idx++ , add_alloc_memo);	//배당사유
				
				int idx = 1;
				//순서 주의
				pstmt.setString(idx++ , listCondition.get(1).replace("-", ""));		//배정기준일자
				pstmt.setString(idx++ , listCondition.get(2));						//휴가유형
				pstmt.setString(idx++ , listCondition.get(3));						//배정일수
				pstmt.setString(idx++ , listCondition.get(1).replace("-", ""));		//배정기준일자
				pstmt.setString(idx++ , listCondition.get(4));						//배정사유
				pstmt.setInt(	idx++ , alloc_id);	//배정자
				pstmt.setInt(	idx++ , Integer.parseInt(arrStr[i]));				//사번
				
				pstmt.addBatch();
			
			}

			System.out.println("------------------------------------------------------\r\n");
			System.out.println("휴가배정 저장 입력 - 저장\r\n" + sql.toString());
			System.out.println("------------------------------------------------------\r\n");
			
			/**************************************************************************/
			//P A R A M E T E R		V A L U E S		E   N   D
			/**************************************************************************/
			
			int[] i = pstmt.executeBatch();	//batch exeucte
			
			/**************************************************************************/
			//T	R	A	N	S	A	C	T	I	O	N				C O M M I T
			/**************************************************************************/
			con.commit();
			
			for (int j : i) {

//				System.out.println(j);
				
				if (j > 0) {
					//update가 적용된 row가 0 이하인 경우
					setRtn_msg("휴가정보가 입력되었습니다.");
				} else {
					setRtn_msg("ERROR가 발생하였습니다.");
				}
			}
			
			System.out.println(rtn_msg);
			
		} catch (SQLException se) {
			/**************************************************************************/
			//T	R	A	N	S	A	C	T	I	O	N				R O L  L B A C K
			/**************************************************************************/
			con.rollback();   // rollback하여 작업된 것을 취소한다..
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) pstmt.close();
				if (rs != null) rs.close();
				if(con != null) con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}          
		}
	}
	
	
	/**
	 * 휴가삭제 DELETE
	 * @since 2009/01/22
	 * 
	 * @throws BaseException
	 * @throws SQLException
	 */
//	public void deleteAllocVacation_p(List<String> listCondition) throws BaseException , SQLException {
//		
//		//System.out.println("----------------------------------------------------------");
//		//System.out.println("파라미터 정보:");
//		
//		//for (int i = 0; i < listCondition.size(); i++) {
//		//	System.out.println(listCondition.get(i));
//		//}
//		
//		//System.out.println("alloc_id : "+alloc_id);
//		//System.out.println("----------------------------------------------------------");
//		
//		con = super.getDataSource().getConnection();
//		
//		try {
//			/**************************************************************************/
//			//T	R	A	N	S	A	C	T	I	O	N				S T A R T
//			/**************************************************************************/
//			con.setAutoCommit(false);				//default value ture
//			
//			sql.setLength(0);	//sql초기화
//			
//			sql.append("\n").append(" DELETE TB_VACATION ");
//			sql.append("\n").append(" WHERE SEQ = ? ");
//			
//            pstmt = con.prepareStatement(sql.toString());
//			
//            /**************************************************************************/
//			//D Y N A M I C	 P A R A M E T E R	 A D D M E N T		S T A R T
//			/**************************************************************************/
//    		
//            /**************************************************************************/
//            //D Y N A M I C	 P A R A M E T E R	 A D D M E N T		E   N   D
//            /**************************************************************************/
//			
//			/**************************************************************************/
//			//P A R A M E T E R		V A L U E S		S T A R T
//			/**************************************************************************/
//
//			String[] arrStr = listCondition.get(0).split(",");	//사번을 배열로 넣음.
//			
//			
//			for (int i = 0; i < arrStr.length; i++) {
//				
//				int idx = 1;
//				
//				//순서 주의
//				//전체 선택하여 삭제시 맨 앞에 on이라는 텍스트가 붙어서 옴.
//				//여기서 체크하여 on이라는 텍스트가 들어가지 못하게 처리한다.
//				//즉 on 아닐때만 쿼리문을 실행하게끔 한다.
//				if(!arrStr[i].equals("on")){
//					pstmt.setInt(	idx++ , Integer.parseInt(arrStr[i]));				//SEQ
//							
//					pstmt.addBatch();
//				}
//			
//			}
//
//			System.out.println("------------------------------------------------------\r\n");
//			System.out.println("휴가삭제 - 삭제\r\n" + sql.toString());
//			System.out.println("------------------------------------------------------\r\n");
//			
//			/**************************************************************************/
//			//P A R A M E T E R		V A L U E S		E   N   D
//			/**************************************************************************/
//			
//			int[] i = pstmt.executeBatch();	//batch exeucte
//			
//			/**************************************************************************/
//			//T	R	A	N	S	A	C	T	I	O	N				C O M M I T
//			/**************************************************************************/
//			con.commit();
//			
//			for (int j : i) {
//
////				System.out.println(j);
//				
//				if (j > 0) {
//					//update가 적용된 row가 0 이하인 경우
//					setRtn_msg("휴가정보가 삭제되었습니다.");
//				} else {
//					setRtn_msg("ERROR가 발생하였습니다.");
//				}
//			}
//			
//			System.out.println(rtn_msg);
//			
//		} catch (SQLException se) {
//			/**************************************************************************/
//			//T	R	A	N	S	A	C	T	I	O	N				R O L  L B A C K
//			/**************************************************************************/
//			con.rollback();   // rollback하여 작업된 것을 취소한다..
//			se.printStackTrace();
//			BaseException dex = new BaseException();                
//			dex.setException(se);
//			dex.setAppReturnCode("10");
//			throw dex;
//		} catch(Exception e) {
//			BaseException dex = new BaseException();                
//			dex.setException(e);
//			dex.setAppReturnCode("20");
//			throw dex;
//		} finally {
//			try {
//				if (pstmt != null) pstmt.close();
//				if (rs != null) rs.close();
//				if(con != null) con.close();
//
//			} catch(SQLException fse) {
//				BaseException dex = new BaseException();                
//				dex.setException(fse);
//				dex.setAppReturnCode("10");
//				throw dex;
//			}          
//		}
//	}
	
	
	/**
	 * <pre>vacation total count</pre>
	 * @param listCondition
	 * @param emp_num
	 * @param authDeptCount
	 * @return
	 * @throws BaseException
	 * @siince	2009/03/24
	 * @author Yang D
	 */
	public int countMyVacation(List<String> listCondition , String emp_num , int authDeptCount) throws BaseException {
		
		int row = 0;
		
		try {
			
			con = super.getDataSource().getConnection();
			
			sql.setLength(0);
			
			sql.append("                         			SELECT COUNT(*) AS CNT                                                                              			\n");
			sql.append("                         			FROM                                                                              								\n");
			sql.append("                         			(                                                                              								\n");
			sql.append("                         				SELECT *                                                                              							\n");
			sql.append("                         				FROM                                                                                  							\n");
			sql.append("                        	 			(                                                                                     							\n");
			sql.append("                         					SELECT UPPER_DEPT_NO , G.DEPT_NO                                                  							\n");
			sql.append("                         					FROM TB_DEPT G                                                                    							\n");
			sql.append("                         					JOIN                                                                              							\n");
			sql.append("                         					(                                                                                 							\n");
			sql.append("                         						--권한이있는 팀                                                               																\n");
			sql.append("                         						SELECT A.DEPT_NO , A.USE_YN                                                   							\n");
			sql.append("                         						FROM TB_AUTH_DEPT A JOIN TB_EMP E                                             							\n");
			sql.append("                         						ON A.EMP_NO = E.EMP_NO                                                        							\n");
			sql.append("                         						AND A.APPROV_YN = 'Y'                                                         							\n");
			sql.append("                	         					AND E.EMP_NO ='"+emp_num+"'----------?로그인 유저                                     							\n");
			//sql.append("            	             					--AND E.EMP_NO <> 1	--관리아이디 제외                                     													\n");
			sql.append("          	        	       					AND A.DEPT_NO LIKE REPLACE('"+listCondition.get(4)+"' , 'ALL' , '%')-----?TEAM                   		\n");
			sql.append("                		       				) T                                                                               							\n");
			sql.append("               	        	  				ON G.DEPT_NO = T.DEPT_NO                                                          							\n");

			if (!listCondition.get(3).equals(CodeMetrix.ALL)) {
				sql.append("                        	 				AND G.UPPER_DEPT_NO	= '"+listCondition.get(3)+"'	--GROUP                                                 \n");
			}
			
			sql.append("                    	     			) X                                                                                   							\n");
			sql.append("                 	        			JOIN                                                                                  							\n");
			sql.append("                         				TB_EMP E                                                                              							\n");
			sql.append("                         				ON X.DEPT_NO = E.FK_DEPT_NO                                                           							\n");
			sql.append("                         				AND E.EMP_NO LIKE REPLACE('"+listCondition.get(0)+"','ALL','%') -----------------------------------?select 		\n");
			sql.append("                         				AND E.EMP_NO <> 1	--관리아이디 제외                                     															\n");

			//재직여부
			if(!listCondition.get(8).equals("") && !listCondition.get(8).equals("ALL")){
				sql.append("                         			AND E.WORK_YN = '"+listCondition.get(8)+"'                                     															\n");
			}
			
			//잔여휴가일수
			if(!listCondition.get(7).equals("") && !listCondition.get(7).equals("ALL")){
				sql.append("                         			AND DATEDIFF(M,'"+listCondition.get(6).replace("-", "")+"',DBO.FNC_GET_VACATION_WORK(E.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"','VACA_E_DATE')) <= '"+listCondition.get(7)+"'                                     															\n");
			}

			//성명 검색
			if(!listCondition.get(5).equals("")){
				sql.append("                         			AND E.EMP_NM LIKE '%"+listCondition.get(5)+"%' \n");
			}
			
			sql.append("                         		) Z                                     																			\n");
			sql.append("                         		WHERE 0=0 \n");
			
//			System.out.println("-------------------======================================\r\n");
//			System.out.println("휴가 조회 권한을 가진 그룹/팀 ALL일  경우 LOOP \r\n" + sql.toString());
//			System.out.println("-------------------======================================\r\n");
			
			pstmt 		= 	con.prepareStatement(sql.toString());
			
			rs 			= 	pstmt.executeQuery();
			
			
			
			if (rs.next()) {
				row		=	rs.getInt("CNT");
			}

		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) 	pstmt.close();
				if (rs != null) 	rs.close();
				if (con != null) 	con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}          
		}
		
		if (authDeptCount == 0) {
			row = 1;
		} else if (emp_num.equals("1") || emp_num.equals("100") ) {
			
		} else {
			row++;
		}
		
		return row ;
	}
	
	/**
	 * 개인휴가 조회
	 * @param listCondition
	 * @throws BaseException
	 * @throws SQLException
	 * @author Yang D
	 */
	public void retrieveMyvacation(HashMap<String, String> empInfo , List<String> listCondition , String emp_num , int authDeptCount , int start_row , int end_row) throws BaseException  {
//		logger.info(listCondition.get(5));
		
		//사번 0
		//년도 1
		//휴가유형 2
		
		/**
			listCondition.add(0 , semp_no);	//사번//그룹과 팀은 하지않음 사번이 유니크함으로
			listCondition.add(1 , syear);	//근무연도
			listCondition.add(2 , svaca);	//휴가유형
			listCondition.add(3 , sgroup);	//
			listCondition.add(4 , steam);	//
			listCondition.add(5 , monthly);	//20090728 - 조회월 ADD
		 */
		
		try {
			con = super.getDataSource().getConnection();
			
			sql.setLength(0);
			if (authDeptCount == 0) {
				
				sql.append("\n").append("                         			SELECT                                                                          ");
				sql.append("\n").append("                         				G.UPPER_DEPT_NO  , G.DEPT_NM GROUP_NM ,                                     ");
				sql.append("\n").append("                         				A.EMP_NO , A.EMP_NM ,                                                       ");
				sql.append("\n").append("                         				A.DEPT_NO  , A.DEPT_NM TEAM_NM                                              ");
				sql.append("\n").append("                         			FROM                                                                            ");
				sql.append("\n").append("                         			(----TEAM                                                                       ");
				sql.append("\n").append("                         			 	SELECT E.EMP_NO , E.EMP_NM, T.DEPT_NO , T.DEPT_NM , T.UPPER_DEPT_NO         ");
				sql.append("\n").append("                         				FROM                                                                        ");
				sql.append("\n").append("                         				(---TB_EMP                                                                  ");
				sql.append("\n").append("                         					SELECT EMP_NO , EMP_NM , FK_DEPT_NO                                     ");
				sql.append("\n").append("                         					FROM TB_EMP                                                             ");
				sql.append("\n").append("                         					WHERE EMP_NO = "+emp_num+"                                              ");
				sql.append("\n").append("                         				) E                                                                         ");
				sql.append("\n").append("                         				JOIN                                                                        ");
				sql.append("\n").append("                         				TB_DEPT T                                                                   ");
				sql.append("\n").append("                         				ON E.FK_DEPT_NO = T.DEPT_NO                                                 ");
				sql.append("\n").append("                         			) A                                                                             ");
				sql.append("\n").append("                         			JOIN                                                                            ");
				sql.append("\n").append("                         			TB_DEPT G	-----GROUP                                                          ");
				sql.append("\n").append("                         			ON A.UPPER_DEPT_NO = G.DEPT_NO                                                                           ");

			} else {
			
				/**
				 * Loop를  돌려서  권한 갯수 만큼 실행한다.
				 */
				sql.append("                         		SELECT *                                                                                  							\n");
				sql.append("                         		FROM                                                                                  								\n");
				sql.append("                         		(                                                                               									\n");
				sql.append("                         			SELECT  ROW_NUMBER() OVER(ORDER BY UPPER_DEPT_NO , DEPT_NO , RANK_NM) AS ROWNUM,	 *                              						\n");
				sql.append("                         			FROM                                                                                  							\n");
				sql.append("                         			(                                                                                     							\n");
				sql.append("                         				SELECT UPPER_DEPT_NO , G.DEPT_NO                                                  							\n");
				sql.append("                         				FROM TB_DEPT G                                                                    							\n");
				sql.append("                         				JOIN                                                                              							\n");
				sql.append("                         				(                                                                                 							\n");
				sql.append("                         					--권한이있는 팀                                                               																\n");
				sql.append("                         					SELECT A.DEPT_NO , A.USE_YN                                                   							\n");
				sql.append("                         					FROM TB_AUTH_DEPT A JOIN TB_EMP E                                             							\n");
				sql.append("                         					ON A.EMP_NO = E.EMP_NO                                                        							\n");
				sql.append("                         					AND A.APPROV_YN = 'Y'                                                         							\n");
				sql.append("                         					AND E.EMP_NO ='"+emp_num+"'----------?로그인 유저                                     							\n");
				//sql.append("                         					--AND E.EMP_NO <> 1	--관리아이디 제외                                     													\n");
				sql.append("                         					AND A.DEPT_NO LIKE REPLACE('"+listCondition.get(4)+"' , 'ALL' , '%')-----?TEAM                   		\n");
				sql.append("                         				) T                                                                               							\n");
				sql.append("                         				ON G.DEPT_NO = T.DEPT_NO                                                          							\n");
	
				if (!listCondition.get(3).equals(CodeMetrix.ALL)) {
					sql.append("                         				AND G.UPPER_DEPT_NO	= '"+listCondition.get(3)+"'	--GROUP                                                 \n");
				}
				
				sql.append("                         				) X                                                                                   							\n");
				sql.append("                         				JOIN                                                                                  							\n");
				sql.append("                         				TB_EMP E                                                                              							\n");
				sql.append("                         				ON X.DEPT_NO = E.FK_DEPT_NO                                                           							\n");
				sql.append("                         				AND E.EMP_NO LIKE REPLACE('"+listCondition.get(0)+"','ALL','%') -----------------------------------?select 		\n");
				sql.append("                         				AND E.EMP_NO <> 1	--관리아이디 제외                                     															\n");
				
				//재직여부
				if(!listCondition.get(8).equals("") && !listCondition.get(8).equals("ALL")){
					sql.append("                         			AND E.WORK_YN = '"+listCondition.get(8)+"'                                     															\n");
				}
				
				//잔여휴가일수
				if(!listCondition.get(7).equals("") && !listCondition.get(7).equals("ALL")){									
					//sql.append(" AND DATEDIFF(M,'"+listCondition.get(6).replace("-", "")+"',DBO.FNC_GET_VACATION_WORK(E.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"','VACA_E_DATE')) <= 1   \n");
					  sql.append(" and (select dateadd(mm, "+listCondition.get(7)+", '"+listCondition.get(6).replace("-", "")+"')) > DBO.FNC_GET_VACATION_WORK(E.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"','VACA_E_DATE') ");
				}

				//성명 검색
				if(!listCondition.get(5).equals("")){
					sql.append("                         			AND E.EMP_NM LIKE '%"+listCondition.get(5)+"%' \n");
				}
				
				sql.append("                         			) Z	                                     																			\n");
				sql.append("                         			WHERE ROWNUM BETWEEN "+start_row+" AND "+end_row+"                                     								\n");

			}		
			
			logger.info("-------------------======================================\r\n");
			logger.info("휴가 조회 권한을 가진 그룹/팀 ALL일  경우 LOOP \r\n" + sql.toString());
			logger.info("-------------------======================================\r\n");
			
			pstmt 		= 	con.prepareStatement(sql.toString());
			
			rs 			= 	pstmt.executeQuery();
			
			vacalist 	= 	new ArrayList<HashMap<String,String>>();
			
			//관리자 , CEO 제외 
			if (!(empInfo.get("emp_no").equals("1") || empInfo.get("emp_no").equals("100")) && authDeptCount != 0) {
				//로그인 유저 포함
				HashMap<String, String> hm = new HashMap<String, String>();
				hm.put("group_no", empInfo.get("group_no"));
				hm.put("team_no", empInfo.get("team_no"));
				hm.put("emp_no", empInfo.get("emp_no"));
				hm.put("emp_nm", empInfo.get("emp_nm"));
				
				vacalist.add(hm);
			}
			
			while (rs.next()) {
				
//				각 행의 각각컬럼의 데이터를 담는다.
				HashMap<String , String>  hash_map = new HashMap<String, String>();
				
				//hash_map.put("대소문자로 구분하여 사용할 것." , "디비에서는 상관없음.");
				//UPPER_DEPT_NO , DEPT_NO , EMP_NO , EMP_NM
				hash_map.put("group_no"			, rs.getString("UPPER_DEPT_NO") );	
				hash_map.put("team_no"			, rs.getString("DEPT_NO") 		);		
				hash_map.put("emp_no"			, rs.getString("EMP_NO") 		);		
				hash_map.put("emp_nm"			, rs.getString("EMP_NM") 		);		
				
				vacalist.add(hash_map);	// 한행의 데이터인 맵객체를 담는다.
			}

			int row = vacalist.size();
			
			HashMap<String, String> temp = null;
			
			listVacation	=	new ArrayList<List<HashMap<String,String>>>();
			
			for (int i = 0 ; i < row ; i++) {	//그룹장 자신 포함.20090930
				
				temp =  vacalist.get(i);
				
				
				group_no 	= 	temp.get("group_no");
				team_no 	= 	temp.get("team_no");
				emp_no 		= 	temp.get("emp_no");
				emp_nm		=	temp.get("emp_nm");
				
				sql.setLength(0);
				sql.append("\n").append(" SELECT RS.GROUP_NM, RS.TEAM_NM, RS.EMP_NM, RS.APPLY_DT, RS.WORK_YN, ");
				sql.append("\n").append(" RS.VACA_S_DATE, RS.VACA_E_DATE, RS.WORK_YEAR, ");
				sql.append("\n").append(" RS.AN_SUM_TOTAL, RS.AN_USE_SUM, (RS.AN_SUM_TOTAL - RS.AN_USE_SUM) AS AN_REST_SUM, ");
				sql.append("\n").append(" RS.SP_SUM_TOTAL, RS.SP_USE_SUM, (RS.SP_SUM_TOTAL - RS.SP_USE_SUM) AS SP_REST_SUM, ");
				sql.append("\n").append(" RS.AN_SP_SUM_TOTAL, RS.AN_SP_USE_SUM, (RS.AN_SP_SUM_TOTAL - RS.AN_SP_USE_SUM) AS AN_SP_REST_SUM, ");
				sql.append("\n").append(" RS.BC_USE_SUM, RS.PB_USE_SUM, RS.ETC_USE_SUM, ");
				sql.append("\n").append(" (RS.AN_SP_USE_SUM + RS.BC_USE_SUM + RS.PB_USE_SUM + RS.ETC_USE_SUM) AS USE_TOTAL, ");
				sql.append("\n").append(" RS.BATCH_FINISH_YN, RS.EMP_NO ");
				sql.append("\n").append(" FROM ");
				sql.append("\n").append(" ( ");
				sql.append("\n").append(" 	SELECT (SELECT DEPT_NM FROM TB_DEPT WHERE DEPT_NO=B.UPPER_DEPT_NO) AS GROUP_NM, ");
				sql.append("\n").append(" 	B.DEPT_NM AS TEAM_NM, A.EMP_NM, A.APPLY_DT, A.WORK_YN, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"','VACA_S_DATE') AS VACA_S_DATE, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"','VACA_E_DATE') AS VACA_E_DATE, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"','WORK_YEAR') AS WORK_YEAR, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"',A.EMP_NO,'2001') AS AN_SUM_TOTAL, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACA_USE_CNT(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"',A.EMP_NO,'2001') AS AN_USE_SUM, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"',A.EMP_NO,'2002') AS SP_SUM_TOTAL, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACA_USE_CNT(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"',A.EMP_NO,'2002') AS SP_USE_SUM, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACA_ALLOC_CNT(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"',A.EMP_NO,'9999') AS AN_SP_SUM_TOTAL, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACA_USE_CNT(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"',A.EMP_NO,'9999') AS AN_SP_USE_SUM, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACA_USE_CNT(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"',A.EMP_NO,'2003') AS BC_USE_SUM, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACA_USE_CNT(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"',A.EMP_NO,'2004') AS PB_USE_SUM, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACA_USE_CNT(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"',A.EMP_NO,'2005') AS ETC_USE_SUM, ");
				sql.append("\n").append(" 	DBO.FNC_GET_VACATION_FINISH_YN(DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(6).replace("-", "")+"','WORK_YEAR'),A.EMP_NO) AS BATCH_FINISH_YN, ");
				sql.append("\n").append(" 	A.EMP_NO ");
				sql.append("\n").append(" 	FROM TB_EMP A ");
				sql.append("\n").append(" 	INNER JOIN TB_DEPT B ON A.FK_DEPT_NO = B.DEPT_NO ");
				sql.append("\n").append(" 	WHERE 0=0 ");
				//재직여부
				if(!listCondition.get(8).equals("") && !listCondition.get(8).equals("ALL")){
					sql.append("\n").append(" 	AND A.WORK_YN = '"+listCondition.get(8)+"' ");
				}
				sql.append("\n").append(" 	AND A.EMP_NO='"+emp_no+"' ");
				sql.append("\n").append(" ) RS ");
				
				//logger.info("======================================\r\n");
				//System.out.println("휴가 조회 쿼리실행 내용\r\n" + sql.toString());
				//logger.info("======================================\r\n");
				
				pstmt 	= 	con.prepareStatement(sql.toString());
				
				rs 		= 	pstmt.executeQuery();
				
				list 	= 	new ArrayList<HashMap<String,String>>();
				
				while (rs.next()) {
					
					//각 행의 각각컬럼의 데이터를 담는다.
					HashMap<String , String>  hash_map = new HashMap<String, String>();
					
					//hash_map.put("대소문자로 구분하여 사용할 것." , "디비에서는 상관없음.");
					//jsp에서 <s:property value='upper_dept_no'/> 와 같아야 함.
					hash_map.put("emp_no"			, rs.getString("EMP_NO") 	);			//사원번호
					
					hash_map.put("batch_finish_yn"	, rs.getString("BATCH_FINISH_YN") 	);			//휴가배정 완료여부

					hash_map.put("group_nm"			, rs.getString("GROUP_NM") 	);			//그룹명
					hash_map.put("team_nm"			, rs.getString("TEAM_NM") 	);			//팀명
					hash_map.put("emp_nm"			, rs.getString("EMP_NM") 	);			//성명
					hash_map.put("apply_dt"			, rs.getString("APPLY_DT") 	);			//입사일
					hash_map.put("work_yn"			, rs.getString("WORK_YN") 	);			//재직여부
					hash_map.put("start_dt"			, rs.getString("VACA_S_DATE") 	);	//휴가시작일
					hash_map.put("end_dt"			, rs.getString("VACA_E_DATE") 	);	//휴가종료일
					
					hash_map.put("an_sum_total"				, rs.getString("AN_SUM_TOTAL"));		//연차휴가 배정일수
					hash_map.put("an_use_sum"				, rs.getString("AN_USE_SUM"));			//연차휴가 사용일수
					hash_map.put("an_rest_sum"				, rs.getString("AN_REST_SUM"));			//연차휴가 잔여일수
					
					hash_map.put("sp_sum_total"				, rs.getString("SP_SUM_TOTAL"));		//특별휴가 배정일수
					hash_map.put("sp_use_sum"				, rs.getString("SP_USE_SUM"));			//특별휴가 사용일수
					hash_map.put("sp_rest_sum"				, rs.getString("SP_REST_SUM"));			//특별휴가 잔여일수
					
					hash_map.put("an_sp_sum_total"			, rs.getString("AN_SP_SUM_TOTAL"));		//연차/특별휴가 배정일수
					hash_map.put("an_sp_use_sum"			, rs.getString("AN_SP_USE_SUM"));		//연차/특별휴가 사용일수
					hash_map.put("an_sp_rest_sum"			, rs.getString("AN_SP_REST_SUM"));		//연차/특별휴가 잔여일수
					
					hash_map.put("bc_use_sum"				, rs.getString("BC_USE_SUM"));			//경조휴가 사용일수
					hash_map.put("pb_use_sum"				, rs.getString("PB_USE_SUM"));			//공가 사용일수
					hash_map.put("etc_use_sum"				, rs.getString("ETC_USE_SUM"));			//기타휴가 사용일수
					
					hash_map.put("use_total"				, rs.getString("USE_TOTAL"));			//전체휴가 사용일수
					
					hash_map.put("tmp_work_year"		, rs.getString("WORK_YEAR") 	);
					
					list.add(hash_map);	// 한행의 데이터인 맵객체를 담는다.
				}
				
				listVacation.add(list);		//전체를 담음.--------------2009/03/12
			}	//for
    	
		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) pstmt.close();
				if (rs != null) rs.close();
				if(con != null) con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}          
		}
	}
	
	/**
	 * [팝업]휴가배정 리스트
	 * @param listCondition
	 * @throws BaseException
	 * @throws SQLException
	 * @author YS
	 */
	public void listVacaAssign(String tmp_emp_no, String assign_type, String standard_date) throws BaseException  {
		System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>안녕?????????????");
		
		try {
			con = super.getDataSource().getConnection();
			
			sql.setLength(0);
			//sql.append("\n").append(" SELECT ROW_NUMBER() OVER(ORDER BY A.EMP_NO) AS ROWNUM, ");
			//sql.append("\n").append(" SELECT ROW_NUMBER() OVER(ORDER BY B.ALLOC_DT asc) AS ROWNUM, ");
			sql.append("\n").append(" SELECT ROW_NUMBER() OVER(ORDER BY B.ALLOC_DT) AS ROWNUM, ");
			sql.append("\n").append(" A.EMP_NM, ");
			sql.append("\n").append(" DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+standard_date+"','VACA_S_DATE') AS VACA_S_DATE, ");
			sql.append("\n").append(" DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+standard_date+"','VACA_E_DATE') AS VACA_E_DATE, ");
			sql.append("\n").append(" (SELECT CD_NM FROM TB_COMM_CD WHERE CD=B.VACATION_TP AND ETC_CD IS NULL) AS VACATION_NM, ");
			sql.append("\n").append(" B.ALLOC_DT, B.ALLOC_NUM, B.REMARK ");
			sql.append("\n").append(" FROM TB_EMP A ");
			sql.append("\n").append(" INNER JOIN TB_VACATION B ON A.EMP_NO=B.EMP_NO ");
			sql.append("\n").append(" WHERE A.EMP_NO='"+tmp_emp_no+"' ");
			sql.append("\n").append(" AND B.ALLOC_DT BETWEEN DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+standard_date+"','VACA_S_DATE') AND '"+standard_date+"' ");
			sql.append("\n").append(" AND B.ALLOC_NUM <> '0' ");
			
			//연차휴가 클릭시
			if(assign_type.equals("2001")){
				sql.append("\n").append(" AND B.VACATION_TP IN ('2001') ");
			}
			
			//특별휴가 클릭시
			if(assign_type.equals("2002")){
				sql.append("\n").append(" AND B.VACATION_TP IN ('2002') ");
			}
			
			//연차+특별휴가 클릭시
			if(assign_type.equals("9999")){
				sql.append("\n").append(" AND B.VACATION_TP IN ('2001','2002') ");
			}
			sql.append("\n").append(" ORDER BY B.ALLOC_DT ");
			
			

//			logger.info("-------------------======================================\r\n");
//			logger.info("휴가 조회 권한을 가진 그룹/팀 ALL일  경우 LOOP \r\n" + sql.toString());
//			logger.info("-------------------======================================\r\n");
			pstmt = con.prepareStatement(sql.toString());
			
			rs = pstmt.executeQuery();
			//pstmt = con.prepareStatement(sql.toString());
			//pstmt.executeQuery();

			
			System.out.println("listVacaAssign>>>>>>>>>>>>>>>>>>>>>"+sql.toString());
			
			//list	 	= 	new ArrayList<HashMap<String,String>>();
			//listVacaAssgin = new ArrayList<List<HashMap<String, String>>>();
			listVacaAssgin = new ArrayList<HashMap<String,String>>();
			
			while (rs.next()) {
				
//				각 행의 각각컬럼의 데이터를 담는다.
				HashMap<String , String>  hash_map = new HashMap<String, String>();
				
				//hash_map.put("대소문자로 구분하여 사용할 것." , "디비에서는 상관없음.");
				hash_map.put("rownum"			, rs.getString("ROWNUM")		);
				hash_map.put("emp_nm"			, rs.getString("EMP_NM")		);
				hash_map.put("start_dt"			, rs.getString("VACA_S_DATE")	);
				hash_map.put("end_dt"			, rs.getString("VACA_E_DATE")	);
				hash_map.put("vacation_nm"		, rs.getString("VACATION_NM")	);
				hash_map.put("alloc_dt"			, rs.getString("ALLOC_DT")		);
				hash_map.put("alloc_num"		, rs.getString("ALLOC_NUM")		);
				hash_map.put("remark"			, rs.getString("REMARK")		);
				
				listVacaAssgin.add(hash_map);
			}
			
			
			//listVacaAssgin.add(list);
			
		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) pstmt.close();
				if (rs != null) rs.close();
				if(con != null) con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}          
		}
	}
	
	
	/**
	 * [팝업]휴가배정 합계
	 * @param listCondition
	 * @throws BaseException
	 * @throws SQLException
	 * @author HEEJIN
	 */
	public float totalVacaAssign(String tmp_emp_no, String assign_type, String standard_date) throws BaseException  {

		try {
			con = super.getDataSource().getConnection();
			
			sql.setLength(0);
			sql.append("\n").append(" select sum(B.ALLOC_NUM) AS TOTAL_ALLOC   ");
			sql.append("\n").append(" FROM TB_EMP A  ");
			sql.append("\n").append(" INNER JOIN TB_VACATION B ON A.EMP_NO=B.EMP_NO   ");			
			sql.append("\n").append(" WHERE A.EMP_NO='"+tmp_emp_no+"' ");
			sql.append("\n").append(" AND B.ALLOC_DT BETWEEN DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+standard_date+"','VACA_S_DATE') AND '"+standard_date+"' ");			
			
			//연차휴가 클릭시
			if(assign_type.equals("2001")){
				sql.append("\n").append(" AND B.VACATION_TP IN ('2001') ");
			}
			
			//특별휴가 클릭시
			if(assign_type.equals("2002")){
				sql.append("\n").append(" AND B.VACATION_TP IN ('2002') ");
			}
			
			//연차+특별휴가 클릭시
			if(assign_type.equals("9999")){
				sql.append("\n").append(" AND B.VACATION_TP IN ('2001','2002') ");
			}

			pstmt = con.prepareStatement(sql.toString());
			
			rs = pstmt.executeQuery();

			System.out.println("totalVacaAssign>>>>>>>>>>>>>>>>>>>>>"+sql.toString());

			if (rs.next()) {
				
				tot_alloc	=	rs.getFloat("TOTAL_ALLOC");
				System.out.println("tot_alloc>>>>>>>>>>>>>>>>>"+tot_alloc);

			}
			
		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) pstmt.close();
				if (rs != null) rs.close();
				if(con != null) con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}     
		}
		return tot_alloc;
	}
	
	
	/**
	 * [팝업]휴가사용 리스트
	 * @param listCondition
	 * @throws BaseException
	 * @throws SQLException
	 * @author YS
	 */
	public void listVacaUse(String tmp_emp_no, String vaca_type, String standard_date) throws BaseException  {
		
		try {
			con = super.getDataSource().getConnection();
			
			sql.setLength(0);
			//sql.append("\n").append(" SELECT ROW_NUMBER() OVER(ORDER BY VACATION_DT DESC) AS ROWNUM, ");
			sql.append("\n").append(" SELECT ROW_NUMBER() OVER(ORDER BY VACATION_DT) AS ROWNUM, ");
			sql.append("\n").append(" EMP_NM, VACA_S_DATE, VACA_E_DATE, VACATION_NM, VACATION_DT, VACATION_CNT, ETC_EMP, ETC_MGR ");
			sql.append("\n").append(" FROM DBO.FNC_GET_VACA_LIST('"+tmp_emp_no+"','"+vaca_type+"','"+standard_date+"') ");
			sql.append("\n").append(" ORDER BY VACATION_DT");
			
//			logger.info("-------------------======================================\r\n");
//			logger.info("휴가 조회 권한을 가진 그룹/팀 ALL일  경우 LOOP \r\n" + sql.toString());
//			logger.info("-------------------======================================\r\n");
			
			pstmt 		= 	con.prepareStatement(sql.toString());
			
			rs 			= 	pstmt.executeQuery();
			
			System.out.println("----------"+sql.toString());
			
			listVacaUse = new ArrayList<HashMap<String,String>>();
			
			while (rs.next()) {
				
//				각 행의 각각컬럼의 데이터를 담는다.
				HashMap<String , String>  hash_map = new HashMap<String, String>();
				
				//hash_map.put("대소문자로 구분하여 사용할 것." , "디비에서는 상관없음.");
				hash_map.put("rownum"			, rs.getString("ROWNUM")		);
				hash_map.put("emp_nm"			, rs.getString("EMP_NM")		);
				hash_map.put("start_dt"			, rs.getString("VACA_S_DATE")	);
				hash_map.put("end_dt"			, rs.getString("VACA_E_DATE")	);
				hash_map.put("vacation_nm"		, rs.getString("VACATION_NM")	);
				hash_map.put("vacation_dt"		, rs.getString("VACATION_DT")	);
				hash_map.put("vacation_cnt"		, rs.getString("VACATION_CNT")	);
				hash_map.put("etc_emp"          , rs.getString("ETC_EMP")       );
				hash_map.put("etc_mgr"			, rs.getString("ETC_MGR")		);
				
				listVacaUse.add(hash_map);
			}
			//listVacaAssgin.add(list);
			
		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) pstmt.close();
				if (rs != null) rs.close();
				if(con != null) con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}          
		}
	}
	
	/**
	 * [팝업]휴가사용 합계
	 * @param listCondition
	 * @throws BaseException
	 * @throws SQLException
	 * @author HEEJIN
	 */
	public float totalVacaUse(String tmp_emp_no, String vaca_type, String standard_date) throws BaseException  {

		try {
			con = super.getDataSource().getConnection();

			sql.setLength(0);
			sql.append("\n").append(" SELECT sum(VACATION_CNT) as tot_vacation_cnt   ");
			sql.append("\n").append(" FROM DBO.FNC_GET_VACA_LIST('"+tmp_emp_no+"','"+vaca_type+"','"+standard_date+"') ");

			pstmt = con.prepareStatement(sql.toString());
			
			rs = pstmt.executeQuery();

			System.out.println("totalVacaAssign>>>>>>>>>>>>>>>>>>>>>"+sql.toString());

			if (rs.next()) {
				
				tot_use	=	rs.getFloat("TOT_VACATION_CNT");
				System.out.println("tot_use>>>>>>>>>>>>>>>>>"+tot_use);

			}
			
		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) pstmt.close();
				if (rs != null) rs.close();
				if(con != null) con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}     
		}
		return tot_use;
	}
	
	/**
	 * [팝업]휴가배정 리스트 삭제기능 포함
	 * @param listCondition
	 * @throws BaseException
	 * @throws SQLException
	 * @author YS
	 */
	public void listVacaAssignMod(String tmp_emp_no, String assign_type, String standard_date) throws BaseException  {
		
		System.out.println("여기여기~~~~~~~~~~~~~~~~~~");
		
		try {
			con = super.getDataSource().getConnection();
			
			sql.setLength(0);
			sql.append("\n").append(" SELECT B.SEQ, ");
			sql.append("\n").append(" A.EMP_NM, ");
			sql.append("\n").append(" DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+standard_date+"','VACA_S_DATE') AS VACA_S_DATE, ");
			sql.append("\n").append(" DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+standard_date+"','VACA_E_DATE') AS VACA_E_DATE, ");
			sql.append("\n").append(" (SELECT CD_NM FROM TB_COMM_CD WHERE CD=B.VACATION_TP AND ETC_CD IS NULL) AS VACATION_NM, ");
			sql.append("\n").append(" B.ALLOC_DT, B.ALLOC_NUM, B.REMARK, ");		
			sql.append("\n").append(" CASE WHEN (F.CLOSE_DT is null ) THEN 'N' ELSE 'Y' END  CLOSE_DT ");
			sql.append("\n").append(" FROM TB_EMP A ");
			sql.append("\n").append(" INNER JOIN TB_VACATION B ON A.EMP_NO=B.EMP_NO ");
			sql.append("\n").append(" LEFT JOIN TB_ATTEND_CLOSE F ON B.ALLOC_DT = F.CLOSE_DT ");			 
			sql.append("\n").append(" WHERE A.EMP_NO='"+tmp_emp_no+"' ");
			sql.append("\n").append(" AND B.ALLOC_DT BETWEEN DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+standard_date+"','VACA_S_DATE') AND '"+standard_date+"' ");
			sql.append("\n").append(" AND B.ALLOC_NUM <> '0' ");
			
			//연차휴가 클릭시
			if(assign_type.equals("2001")){
				sql.append("\n").append(" AND B.VACATION_TP IN ('2001') ");
			}
			
			//특별휴가 클릭시
			if(assign_type.equals("2002")){
				sql.append("\n").append(" AND B.VACATION_TP IN ('2002') ");
			}
			
			//연차+특별휴가 클릭시
			if(assign_type.equals("9999")){
				sql.append("\n").append(" AND B.VACATION_TP IN ('2001','2002') ");
			}
			sql.append("\n").append(" ORDER BY B.ALLOC_DT DESC ");


//			logger.info("-------------------======================================\r\n");
//			logger.info("휴가 조회 권한을 가진 그룹/팀 ALL일  경우 LOOP \r\n" + sql.toString());
//			logger.info("-------------------======================================\r\n");
			
			pstmt 		= 	con.prepareStatement(sql.toString());
			
			rs 			= 	pstmt.executeQuery();
			System.out.println("sql>>>>>>>>>>>>>>>>>>>>>>"+sql);
			
			//list	 	= 	new ArrayList<HashMap<String,String>>();
			//listVacaAssgin = new ArrayList<List<HashMap<String, String>>>();
			listVacaAssginM = new ArrayList<HashMap<String,String>>();
			
			while (rs.next()) {
				
//				각 행의 각각컬럼의 데이터를 담는다.
				HashMap<String , String>  hash_map = new HashMap<String, String>();
				
				//hash_map.put("대소문자로 구분하여 사용할 것." , "디비에서는 상관없음.");
				hash_map.put("rownum"			, rs.getString("SEQ")		);
				hash_map.put("emp_nm"			, rs.getString("EMP_NM")		);
				hash_map.put("start_dt"			, rs.getString("VACA_S_DATE")	);
				hash_map.put("end_dt"			, rs.getString("VACA_E_DATE")	);
				hash_map.put("vacation_nm"		, rs.getString("VACATION_NM")	);
				hash_map.put("alloc_dt"			, rs.getString("ALLOC_DT")		);
				hash_map.put("alloc_num"		, rs.getString("ALLOC_NUM")		);
				hash_map.put("remark"			, rs.getString("REMARK")		);
				hash_map.put("close_dt"			, rs.getString("CLOSE_DT")		);
				
				listVacaAssginM.add(hash_map);
			}
			//listVacaAssgin.add(list);
			
		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();                
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch(Exception e) {
			BaseException dex = new BaseException();                
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null) pstmt.close();
				if (rs != null) rs.close();
				if(con != null) con.close();

			} catch(SQLException fse) {
				BaseException dex = new BaseException();                
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}          
		}
		
	}
	
	/**
	 * <pre>휴가시작일 ~ 종료일 정보를 조회함.</pre>
	 * @param emp_no			-	사번
	 * @throws BaseException
	 */
	public void searchVacaDate(List<String> listCondition, String emp_no) throws BaseException {
		
		try {

			con 	= 	getDataSource().getConnection();
			
			sql.setLength(0);
		
			sql.append(" SELECT AA.ROWNUM, AA.EMP_NO, AA.GROUP_NM, AA.TEAM_NM, AA.EMP_NM, AA.APPLY_DT, ");
			sql.append(" AA.VACA_S_DATE, AA.VACA_E_DATE, ");
			sql.append(" AA.UPPER_DEPT_NO, AA.DEPT_NO ");
			sql.append(" FROM ( ");
			sql.append(" SELECT ROW_NUMBER() OVER(ORDER BY A.EMP_NO) AS ROWNUM, ");
			sql.append(" (SELECT DEPT_NM FROM TB_DEPT WHERE DEPT_NO=B.UPPER_DEPT_NO) AS GROUP_NM, ");
			sql.append(" B.DEPT_NM AS TEAM_NM, A.EMP_NM, A.APPLY_DT, ");
			sql.append(" DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"','VACA_S_DATE') AS VACA_S_DATE, ");
			sql.append(" DBO.FNC_GET_VACATION_WORK(A.APPLY_DT,'"+listCondition.get(0).replace("-", "")+"','VACA_E_DATE') AS VACA_E_DATE, ");
			sql.append(" A.EMP_NO, B.UPPER_DEPT_NO, B.DEPT_NO ");
			sql.append(" FROM TB_EMP A ");
			sql.append(" INNER JOIN TB_DEPT B ON A.FK_DEPT_NO = B.DEPT_NO ");		
			sql.append(" WHERE A.WORK_YN='Y' AND A.EMP_NO = " + emp_no + ") AA  " );


			pstmt 	= 	con.prepareStatement(sql.toString());
			rs 		= 	pstmt.executeQuery();
			
			System.out.println("휴가 시작일 ~ 종료일 조회 쿼리 start>>>>>>>>>>>>>>>>>>>>>");
			System.out.println(sql.toString());
			System.out.println("휴가 시작일 ~ 종료일 조회 쿼리 end>>>>>>>>>>>>>>>>>>>>>");

			vaca_info	=	new HashMap<String, String>();
			
			while (rs.next()) {

				vaca_info.put("emp_no"		, rs.getString("EMP_NO")); 		
				vaca_info.put("emp_nm"		, rs.getString("EMP_NM")); 	
				vaca_info.put("group_nm"		, rs.getString("GROUP_NM")); 		
				vaca_info.put("team_nm"		, rs.getString("TEAM_NM")); 	
				vaca_info.put("vaca_s_date"		, rs.getString("VACA_S_DATE")); 		
				vaca_info.put("vaca_e_date"		, rs.getString("VACA_E_DATE")); 

			}

		} catch (SQLException se) {
			se.printStackTrace();
			BaseException dex = new BaseException();
			dex.setException(se);
			dex.setAppReturnCode("10");
			throw dex;
		} catch (Exception e) {
			BaseException dex = new BaseException();
			dex.setException(e);
			dex.setAppReturnCode("20");
			throw dex;
		} finally {
			try {
				if (pstmt != null)
					pstmt.close();
				if (rs != null)
					rs.close();
				if (con != null)
					con.close();
			} catch (SQLException fse) {
				BaseException dex = new BaseException();
				dex.setException(fse);
				dex.setAppReturnCode("10");
				throw dex;
			}
		}
		
	}
	
	/**
	 * <pre>NULL이거나 Blank인지 확인</pre>
	 * @param str
	 * @return
	 */
	public String ifNullisZero(String str) {
		
		if (str == null || str.equals("")) {
			str = "0";
		}
		
		return str;
	}
	
	/************************** G E T T E R / S E T T E R S T A R T *****************************/
	public List<HashMap<String, String>> getList() {
		return list;
	}

	public void setList(List<HashMap<String, String>> list) {
		this.list = list;
	}

	public String getRtn_msg() {
		return rtn_msg;
	}

	public void setRtn_msg(String rtn_msg) {
		this.rtn_msg = rtn_msg;
	}

	public int getRowCount() {
		return rowCount;
	}

	public void setRowCount(int rowCount) {
		this.rowCount = rowCount;
	}
	
	public float getTot_alloc() {
		return tot_alloc;
	}

	public void setTot_alloc(float tot_alloc) {
		this.tot_alloc = tot_alloc;
	}
	
	public float getTot_use() {
		return tot_use;
	}

	public void setTot_use(float tot_use) {
		this.tot_use = tot_use;
	}

	public List<List<HashMap<String, String>>> getListVacation() {
		return listVacation;
	}

	public void setListVacation(List<List<HashMap<String, String>>> listVacation) {
		this.listVacation = listVacation;
	}

	public ArrayList<HashMap<String, String>> getListVacaAssgin() {
		return listVacaAssgin;
	}

	public void setListVacaAssgin(ArrayList<HashMap<String, String>> listVacaAssgin) {
		this.listVacaAssgin = listVacaAssgin;
	}
	
	/*public ArrayList<HashMap<String, String>> getTotalVacaAssgin() {
		return totalVacaAssgin;
	}

	public void setTotalVacaAssgin(ArrayList<HashMap<String, String>> totalVacaAssgin) {
		this.totalVacaAssgin = totalVacaAssgin;
	}*/
	
	public int getTotalVacaAssgin() {
		return totalVacaAssgin;
	}

	public void setTotalVacaAssgin(int totalVacaAssgin) {
		this.totalVacaAssgin = totalVacaAssgin;
	}

	public ArrayList<HashMap<String, String>> getListVacaUse() {
		return listVacaUse;
	}

	public void setListVacaUse(ArrayList<HashMap<String, String>> listVacaUse) {
		this.listVacaUse = listVacaUse;
	}

	public ArrayList<HashMap<String, String>> getListVacaAssginM() {
		return listVacaAssginM;
	}

	public void setListVacaAssginM(
			ArrayList<HashMap<String, String>> listVacaAssginM) {
		this.listVacaAssginM = listVacaAssginM;
	}
	
	public HashMap<String, String> getVaca_info() {
		return vaca_info;
	}

	public void setVaca_info(HashMap<String, String> vaca_info) {
		this.vaca_info = vaca_info;
	}

	/************************** G E T T E R / S E T T E R E   N   D ******************************/
}
